/**
 * @param {number[]} nums
 * @return {number}
*/
var findRepeatNumber = function(nums) {
  let map = new Map();
  for(let i = 0; i < nums.length; i++) {
    if(!map.has(nums[i])) {
      map.set(nums[i], true);
    } else {
      return nums[i];
    }
  }
};
let nums = [2, 3, 1, 0, 2, 5, 3];
console.log(findRepeatNumber(nums));
